//构造函数
function getMsg(name,age){
      this.name=name
      this.age=age
}

getMsg.prototype.gets=function(){
    return this.name+"-"+this.age
}

//创建对象
let p=new getMsg("张小萌",16)
let p1=new getMsg("王思雨",20)

app.innerHTML=p.gets()
app1.innerHTML=p1.gets()